package study.singleton;

public class LazyInnerSingleton {

    private static  LazyInnerSingleton lazyInnerSingleton = null ;

    private LazyInnerSingleton(){}

    public static LazyInnerSingleton getInstance(){
        return SingletonHolder.HOLDER;
    }
    private static class SingletonHolder{
        //内部类方法是在被调用时才会实例化
        private static  final  LazyInnerSingleton HOLDER = new LazyInnerSingleton();
    }


}
